import os

def checker():
    with open("candidates_list","r+") as f:
        return [y for y in [int(x) for x in [z for z in f.read().split("\n") if len(z) > 0]] if y != 5]

target = input("please enter a positive integer other than 5:\n")
target = int(target)
assert target > 0
assert target !=5
assert target not in checker()
tmpscript="tmpscript.sh"
cmd = "echo {} >> candidates_list\npython3 -c \"import os; os.remove('tmpscript.sh')\"".format(target)
with open(tmpscript,"w+") as f:
    f.write(cmd)
os.system("bash {}".format(tmpscript))

print("target",target,"added.")
